package club.monkeywood.dataobject;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@DynamicUpdate  //自动更新时间
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderDetail {

  @Id  //用随机字符串生成器生成key
  private String id;

  private String orderId;
  private Integer productId;
  private String productName;
  private BigDecimal productPrice;
  private Integer productQuantity;
  private Date createTime;
  private Date updateTime;

}
